<template>
	<view class="user">
		<view class="left">
			<text class="name">{{props.name}}</text>
			<view class="sign-in">
				<text class="sign-in-txt">{{props.signStatus}}</text>
				<image class="arrow" src="https://peixin.peiyu.online/xmk/images/箭头.svg" mode="widthFix"></image>
			</view>
		</view>
		<view class="right">
			<image class="avatar" :src="props.avatar" mode="widthFix"></image>
		</view>
	</view>
</template>

<script setup>
	const props = defineProps({
		name: {
			type: String,
			default: "用户"
		},
		signStatus: {
			type: String,
			default: "休息中"
		},
		avatar: {
			type: String,
			default: "../../static/images/默认头像.svg"
		}
	});
</script>

<style lang="scss" scoped>
	.user {
		width: 750rpx;
		display: flex;
		justify-content: space-between;
		align-items: center;
		padding: 40rpx 25rpx 0 25rpx;
		background-color: $main-background-color;

		.left {
			height: 124rpx;
			display: flex;
			flex-direction: column;
			justify-content: space-between;
			align-items: left;

			.name {
				font-family: Alibaba PuHuiTi 2.0 light;
				font-weight: 400;
				font-size: 40rpx;
				color: $font-primary-color;
			}

			.sign-in {
				width: 152rpx;
				height: 54rpx;
				border-radius: 100rpx;
				border: 1rpx solid $primary-color;
				display: flex;
				justify-content: center;
				align-items: center;

				.sign-in-txt {
					font-family: Alibaba PuHuiTi 2.0 light;
					font-weight: 300;
					font-size: 24rpx;
					color: $primary-color;
				}

				.arrow {
					width: 20rpx;
				}
			}
		}

		.right {
			.avatar {
				width: 124rpx;
				height: 124rpx;
			}
		}
	}
</style>